#pragma once

#include "../GameObject.h"

#include <memory>
#include <vector>

class Room;
typedef std::shared_ptr<Room> RoomPtr;

class World;
typedef std::shared_ptr<World> WorldPtr;

class World : public GameObject
{
public:
	static WorldPtr getSingleton();
	World();
	~World();
	void init(const RoomPtr &start_room = nullptr);

	const RoomPtr &getStartRoom() const { return start_room; }

	void setCurrentClock(long clock) { this->clock = clock; }
	long getCurrentClock() const { return clock; }

private:
	static WorldPtr singleton;
	RoomPtr start_room;
	std::vector<RoomPtr> rooms;
	long clock;
};
